package com.cn.aam.checaiduo.ui.me.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.cn.aam.checaiduo.R;
import com.cn.aam.checaiduo.base.adapter.BaseRecycerAdapter;
import com.cn.aam.checaiduo.base.adapter.holder.BaseRecyclerViewHolder;
import com.cn.aam.checaiduo.bean.me.RechageB;

import butterknife.BindView;

/**
 * monker on 2017/5/26.
 */

public class RechargeRecordAdapter extends BaseRecycerAdapter<RechageB> {


    public RechargeRecordAdapter(Context mContext) {
        super(mContext);
    }

    @Override
    protected BaseRecyclerViewHolder getViewHolder(View picNewsView) {
        return new RechargeHolder(picNewsView);
    }

    @Override
    protected int getItemLayoutRes() {
        return R.layout.list_item_recharge;
    }

    @Override
    protected void ItemVIewChange(BaseRecyclerViewHolder recyclerholder, int position) {
        RechargeHolder holder = (RechargeHolder) recyclerholder;
        holder.tvNum.setText(getItem(position).getAmount());
        holder.tvTime.setText(getItem(position).getCreated_time());
    }

    class RechargeHolder extends BaseRecyclerViewHolder {
        @BindView(R.id.tv_final_result)
        TextView tvFinalResult;
        @BindView(R.id.tv_num)
        TextView tvNum;
        @BindView(R.id.tv_time)
        TextView tvTime;

        public RechargeHolder(View itemView) {
            super(itemView);
        }
    }
}
